Testclassdebug.t[775]

Based upon the Test object in the TADS library, this overhauls it to actually work and provide needed functionality for actually ASSERTing if something is correct Moreover, the Test did not work and had issues with "leftovers" where each subsequent test depended upon the results of the previous test!


Test 'foo' ['x me', 'i', 'wear uniform'] [uniform] @location;

Would cause the uniform to be moved into the player character's inventory and then the commands X ME and then I and WEAR UNIFORM to be executed in response to TEST FOO. Both the location and the inventory entries are optional

class Test :   object

Superclass Tree   (in declaration order)

Test
        object

Subclass Tree  

(none)

Global Objects  

(none)

Summary of Properties  

clearAssertBufferBeforeCmd  location  reportHolding  reportMove  restartBeforeTest  restoreStartStateAfterTest  testHolding  testList  testName  testOrder 

Summary of Methods  

getHolding  run 

Properties  

clearAssertBufferBeforeCmddebug.t[822]

By default, we want to clear out the message buffer before each non-assert command, but you can change that for each test

locationdebug.t[792]
The location to move the player character to before running the test script

reportHoldingdebug.t[798]
Flag: do we want to report on what items were added to inventory? By default we do.

reportMovedebug.t[804]
Flag: Do we want to report any change of location by looking around in the new one? By default we will.

restartBeforeTestdebug.t[816]
If you need to restart the game BEFORE running the test activity and values

restoreStartStateAfterTestdebug.t[810]
Restore game to where it was before this test. The default value is nil.

testHoldingdebug.t[786]
The objects to move into the player character's inventory before running the test script.

testListdebug.t[780]
The list commands to be executed when running this test.

testNamedebug.t[777]
The name of this test

testOrderdebug.t[963]
The test all command will run tests in ascending order of their test order. By default we use the sourceTextOrder.

Methods  

getHolding ( )debug.t[827]

Move everything in the testHolding list into the actor's inventory

run ( )debug.t[848]
Run this test by passing the commands into a script file to replay

Adv3Lite Library Reference Manual
Generated on 08/12/2025 from adv3Lite version 2.2.2